// import LoginCode from '../pages/login/LoginCode'
// import LoginPassword from '../pages/login/LoginPassword'
// import RegisterCode from '../pages/regsiter/RegisterCode'
// import RegisterPassword from '../pages/regsiter/RegisterPassword'
// import RegisterPhone from '../pages/regsiter/RegisterPhone'
// import CountryPicker from '../components/CountryPicker'
// import Home from '../pages/home/index'
/*
  路由懒加载
    1. 将组件进行单独打包，单独打包成一个js文件和css文件
    2. 按需加载，需要用到的组件才会加载，不用的不加载
*/
import { lazy } from 'react'
const LoginCode = lazy(() => {
  '../pages/login/LoginCode'
})
const LoginPassword = lazy(() => {
  '../pages/login/LoginPassword'
})
const RegisterCode = lazy(() => {
  '../pages/regsiter/RegisterCode'
})
const RegisterPassword = lazy(() => {
  '../pages/regsiter/RegisterPassword'
})
const RegisterPhone = lazy(() => {
  '../pages/regsiter/RegisterPhone'
})
const CountryPicker = lazy(() => {
  '../components/CountryPicker'
})
const Home = lazy(() => {
  '../pages/home/index'
})
const routes = [
  {
    path: '/',
    component: Home,
  },
  {
    path: '/login/code',
    component: LoginCode,
  },
  {
    path: '/login/password',
    component: LoginPassword,
  },
  {
    path: '/register/phone',
    component: RegisterPhone,
  },
  {
    path: '/register/code',
    component: RegisterCode,
  },
  {
    path: '/register/password',
    component: RegisterPassword,
  },
  {
    path: '/countryPicker',
    component: CountryPicker,
  },
]

export default routes
